#include<stdio.h>
#include<stdlib.h>
#include<memory.h>

int main()
{
	int * p = (int *)malloc(sizeof(int) * 3);
	if(p == NULL)
	{	
		printf("malloc error!\n");
		return 0;
	}

	int i = 0;
	for(; i < 3; ++i)
		p[i] = i;

	printf("ready to free %p\n", p);
	free(p);
	return 0;
}
